define(function(require,exports,module){
	exports.init = function(){

	}	
	exports.operate = function(){
		//cookbook点击确认
		admin_form_click_submit();
		

	}
	exports.win_resize = function(){

	}
	function admin_form_click_submit(){
		
		$(".IbtnEnterCssClass").live('click',function(){
			if($("input[name='UserName']").val() == ''){
				$("#ErrorMessage").text("用户名不能为空!");
				$("#ErrorMessage").css("color","red");
			}
			if($("input[name='Password']").val() == ''){
				$("#ErrorMessage").text("密码不能为空!");
				$("#ErrorMessage").css("color","red");
			}			
			var data = $("form[name='admin_login_form']").serializeArray();
			$.post(admin_login_url,data,function(e){
				if(!e.status){
					var str = $("#ErrorMessage").text();
					$("#ErrorMessage").text(str+e.message);
					$("#ErrorMessage").css("color","red");	
					return;			
				}
				$.Zebra_Dialog(e.message, {
				    'type':'information',
				    'buttons':  ['确定'],
				    'onClose':  function(caption) {
						window.location = login_to_url;	
				    }
				});		
				
			},'json');
		});
	}
	


});